package com.demo.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.StringJoiner;


public class User {
    private int id;
    private String mobile;
    private String captcha;
    private String password;
    private String avatar;
    private String email;
    private String jpg;
    private int code;
    private  String token;

    public User(int id, String mobile, String captcha, String password, String avatar, String email, String jpg, int code, String token) {
        this.id = id;
        this.mobile = mobile;
        this.captcha = captcha;
        this.password = password;
        this.avatar = avatar;
        this.email = email;
        this.jpg = jpg;
        this.code = code;
        this.token = token;
    }

    public User() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getJpg() {
        return jpg;
    }

    public void setJpg(String jpg) {
        this.jpg = jpg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", User.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("mobile='" + mobile + "'")
                .add("captcha='" + captcha + "'")
                .add("password='" + password + "'")
                .add("avatar='" + avatar + "'")
                .add("email='" + email + "'")
                .add("jpg='" + jpg + "'")
                .add("code=" + code)
                .add("token='" + token + "'")
                .toString();
    }
}
